<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<s:property value="#application.website.keywords"/>" />
<meta name="description" content="<s:property value="#application.website.description"/>" />
<title>活动-<s:property value="#application.website.websiteName"/></title>
<link href="css/css.css"  type="text/css" rel="stylesheet"/>
</head>
<body>
 <div id="container">
   <div id="Header">
     <jsp:include page="../header.jsp"></jsp:include>
   </div>
   <div id="PageBody">
     <div class="mina">
       <div class="subleft">
         <div class="subnav">
           <img src="images/zy_26.gif" />
           <ul>
             <s:iterator value="categoryList" id="id">
                   <li><a href="activities.action?page=1&searchStr=<s:property value="#id[0].id"/>_-2_-2_"><s:property value="#id[0].name"/></a></li>
                    <s:if test="%{#id[1].size!=0}">
                       <s:set name="str" ><s:property value="#id[0].id"/></s:set>
                       <s:if test="%{#parameters.searchStr[0].split('_')[0]==#str}">
                         <div class="navclass" style="display:block;">
                       </s:if>
                       <s:else>
                          <div class="navclass">
                       </s:else>
	                    <s:iterator value="#id[1]">
	                        -<a href="activities.action?page=1&searchStr=<s:property value="pid"/>_<s:property value="id"/>_-2_" hasbox="2">&nbsp;<s:property value="name"/></a> <br />
	                    </s:iterator>
			            </div>
                    </s:if>
             </s:iterator>
           </ul>
           <div class="navbott">资合信-易通卡</div>
         </div>
         
           <jsp:include page="../context.jsp"></jsp:include>
        
       </div>
       <div class="subright">
         <div class="subright01">
           <div class="subtitle"><s:property value="path" escape="false"/>
           </div>
           <div class="subright02">
             <div class="activitybox">
             <s:iterator value="list" id="id">
                <div class="showbox">
	               <div class="imgbox"><a href="activities!activitiesDetial.action?activities.id=<s:property value="#id[0].id"/>"><img src="<s:property value="#id[0].image"/>" /></a></div>
	               <div class="boxcont">
	               <p><span></span><a href="activities!activitiesDetial.action?activities.id=<s:property value="#id[0].id"/>"><s:property value="#id[0].title"/></a></p>
	                 <s:property value="@com.linkcard.commen.tools.Helper@deleteHtml(#id[0].description, 80, '..')"/>
	               </div>
	             </div>
             </s:iterator>
           </div>
           <div class="page">
               <s:if test="#request.list.size()!=0">
				 <s:if test="%{searchStr!=null}">
				   <s:set name="pageUrl" >activities.action?searchStr=${ searchStr}&page=</s:set>
				  </s:if>
			     <s:else>
			      <s:set name="pageUrl" >activities.action?page=</s:set>
			     </s:else>
			      <a href="${pageUrl}1">第一页</a>
			      <a href="${pageUrl}<s:property value="#request.pageObj.prePage"/>">&lt; 上一页 </a>
			      <s:set name="totalPage" value="#request.pageObj.totalPage"></s:set>
			      <s:set name="currentPage" value="#request.pageObj.currentPage"></s:set>
								   <s:if test="#currentPage<=0">
								      <s:set name="currentPage" value="1"></s:set>
								   </s:if>
								   <s:elseif test="#currentPage>#totalPage">
								      <s:set name="currentPage" value="#totalPage"></s:set>
								   </s:elseif>
								   
								   <s:if test="#totalPage%6>0">
								       <s:set name="pageSize" value="#totalPage/6+1"></s:set>
								   </s:if>
								   <s:else>
								       <s:set name="pageSize" value="#totalPage/6"></s:set>
								   </s:else>
								   <s:if test="#currentPage%6>0">
								       <s:set name="cPageSize" value="#currentPage/6+1"></s:set>
								   </s:if>
								   <s:else>
								       <s:set name="cPageSize" value="#currentPage/6"></s:set>
								   </s:else>
								   <s:set name="first" value="6*(#cPageSize-1)"></s:set>
								   <s:if test="#first==0">
								      <s:set name="first" value="1"></s:set>
								   </s:if>
								   <s:set name="last" value="#cPageSize*6"></s:set>
								   <s:if test="#last>#totalPage">
								      <s:set name="last" value="#totalPage"></s:set>
								   </s:if>
					
								     <s:bean name="org.apache.struts2.util.Counter" id="counter"> 
								       <s:param name="first" value="#first"/>
								       <s:param name="last" value="#last" />
								       <s:iterator status="status"> 
								         <s:if test="#currentPage==(#status.index+#first)">
								            <s:a href="%{pageUrl}%{#status.index+#first}" cssClass="on" ><s:property value="#status.index+#first" /></s:a>
								         </s:if>
								         <s:else>
								           <s:a href="%{pageUrl}%{#status.index+#first}" ><s:property value="#status.index+#first" /></s:a>
								         </s:else>
								       </s:iterator> 
								     </s:bean>
								     <s:if test="#last<#totalPage">
								       ......&nbsp;
								     </s:if>
			      <a href="${pageUrl}<s:property value="#request.pageObj.nextPage"/>">下一页 ></a>
			      <a href="${pageUrl}<s:property value="#request.pageObj.totalPage"/>">最后一页</a>
			   </s:if> 
	             
           </div>
           </div>
         </div>
       </div>
     </div>
   </div>
   <div id="Footer">
        <jsp:include page="../bottom.jsp"></jsp:include>
   </div>
 </div>
</body>
</html>
